/**************************************************************************
* ++
* Author: Luu Dinh Nhat
* Module Name : CFolderTree.h
*
* Description : La noi khai bao bien va phuong thuc cua lop CFolderTree
*
* Mod. History : 08.06.2013 - Luu Dinh Nhat
* File first created
* VYI PROJECT
* Description
*
* --
************************************************************************/
#pragma once
#include "CBoardCell2D.h"

using namespace Gdiplus;

// CFolderTree

class CFolderTree : public CWnd
{
	DECLARE_DYNAMIC(CFolderTree)

protected:
	/* Cay thu muc */
	int m_nColumn;				//So cot hien thi
	int m_nRow;					//So dong hien thi
	int m_nCurrentCellID;		//ID cua cell hien tai dang focus

	/* Thu muc */
	int m_nWidthFolder;			//Chieu rong cua thu muc
	int m_nHeightFolder;		//Chieu dai cua thu muc

	CList<CBoardCell2D*>		m_lstFolders;		//Danh sach cac thu muc co trong cay thu muc
	ULONG_PTR					m_gdiplusToken;

public:
	CFolderTree();					//Ham khoi tao
	virtual ~CFolderTree();			//Ham huy
	int		GetColumn();			//Lay so cot
	int		GetRow();				//Lay so dong
	int		GetWidthFolder();		//Lay chieu rong cua thu muc
	int		GetHeightFolder();		//Lay chieu dai cua thu muc
	void	SetColumn(int);			//Gan so cot
	void	SetRow(int);			//Gan so dong
	void	SetWidthFolder(int);	//Gan chieu rong cua thu muc
	void	SetHeightFolder(int);	//Gan chieu dai cua thu muc

	//Khoi tao cay thu muc
	virtual BOOL CreateFolderTree(int, int, const RECT&, CWnd*) = 0;
	//Khoi tao vi tri cua cay thu muc
	virtual void CreateMainRect(CRect*) = 0;

protected:
	DECLARE_MESSAGE_MAP()
public:
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
};


